const mongoose = require('mongoose');

const { Classify } = require('../../model/classify')

const {Article} = require('../../model/article')

module.exports = async (req, res) => {
    var data = await Classify.find()
    var num = await Article.find({status:true}).count()
    data.num = num
    res.send({
        data,
        num,
        meta: {
            status: 200,
            msg: '请求成功'
        }
    })
}